import React, { useRef, useState, useEffect } from "react";
import { Empty, message, Spin, Modal } from "antd";
import styled from "styled-components";
import { useNavigate, useParams } from "react-router-dom";
import { downloadFile, getFileType } from "../../utils/file-helper";
import { fileDetail } from "../../services/suture";
import { formatPicUrl } from "../../utils/formatter";
import * as antdHelper from "../../utils/antd-helper";
import * as oss from "../../services/oss";
import webconfig from "../../webconfig";
import copy from "copy-to-clipboard";
import store from "../../utils/store";

import FileDetail from "../../components/FileDetail";

function Main({ className }) {
	const { fid, shareid } = useParams();
	const navigate = useNavigate();

	return (
		<div className={className}>
			<FileDetail className="file-detail" fid={fid} shareid={shareid} onNavBack={()=>navigate('/discover')}/>
		</div>
	);
}

export default Main;